package com.aabte.weather.weather.api;

import com.aabte.weather.weather.api.dto.WeatherResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name = "micro-weather-gateway-server", path = "/micro-weather-data-server")
@RequestMapping(path = "/weather")
public interface WeatherApi {

    @RequestMapping(path = "/city-id/{cityId}", method = RequestMethod.GET)
    WeatherResponse getReportByCityId(@PathVariable(name = "cityId") String cityId);

    @RequestMapping(path = "/city-name/{cityName}", method = RequestMethod.GET)
    WeatherResponse getReportByCityName(@PathVariable(name = "cityName") String cityName);

}
